package com.group3.hospital.service.impl;

import com.group3.hospital.bean.Note;
import com.group3.hospital.mapper.NoteMapper;
import com.group3.hospital.service.NoteService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class NoteServiceImpl implements NoteService {

    @Resource
    private NoteMapper noteMapper;

    @Override
    public List<Note> queryAll() throws Exception{
        return noteMapper.queryAll();
    }

    @Override
    public void updatenote(Note note) throws Exception {
        noteMapper.updateNote(note);
    }

    @Override
    public void deleteById(Integer id) throws Exception {
        noteMapper.deleteById(id);
    }

    @Override
    public Note queryById(Integer id) {
        return noteMapper.queryById(id);
    }

    @Override
    public void addNote(Note note) throws Exception {
        noteMapper.addNote(note);
    }


}
